package com.kjlink.internal.report4vue.statictics.controller;

import cn.xuqiudong.common.base.model.BaseResponse;
import com.kjlink.internal.report4vue.base.controller.BaseApiController;
import com.kjlink.internal.report4vue.statictics.service.ApiStatPlanService;
import com.kjlink.internal.workreport.stats.lookup.UserWeekLookup;
import com.kjlink.internal.workreport.stats.vo.EchartsHeatmapVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 描述:
 *      人员计划统计
 * @author Vic.xu
 * @since 2025-03-06 10:37
 */
@RestController
public class ApiStatPlanController extends BaseApiController {

    @Resource
    private ApiStatPlanService apiStatPlanService;

    /**
     * 人员计划统计: 热力图
     */
    @RequestMapping(value = "/stat/plan", method = {RequestMethod.GET, RequestMethod.POST})
    public BaseResponse<EchartsHeatmapVo> weekBar(@RequestBody UserWeekLookup lookup) {
//        return BaseResponse.success(apiStatPlanService.statPlan(lookup));
        return BaseResponse.success(apiStatPlanService.planHeatmap(lookup));
    }
}
